﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="querydatabase.aspx.cs" Inherits="UI_querydatabase" %>

 <html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>执行SQL语句</title>
    <link href="../images/style.css" rel="Stylesheet" />
        <script language="javascript" type="text/javascript" src="../js/jquery-1.3.2.min.js"></script>
    <script language="javascript" type="text/javascript" src="../js/jiazai.js"></script>

</head>
<body>
     
    <form id="form1" runat="server">
    <div>
        <table width="100%" class="tableBorder" border='1' cellspacing="0" style="border-collapse: collapse;"
            bgcolor="#ffffff" bordercolor="#cccccc">
            <tr align="center" valign="middle">
                <th height="22" colspan="88">
                    数 据 库 管 理
                </th>
            </tr>
            <tr>
                <td style="width: 50px">
                    可用操作
                </td>
                <td>
                    <asp:Button ID="btnok" runat="server" CssClass="btn" Text=" 压缩数据库 " OnClick="btnok_Click" />
                    &nbsp;
                    <asp:Button ID="btnbackup" runat="server" CssClass="btn" Text=" 备份数据库 " OnClick="btnbackup_Click" />
                </td>
            </tr>
            <tr>
                <td>
                    操作提示
                </td>
                <td colspan="2">
                    备份文件在网站根目录App_data文件夹中。请用FTP软件下载后妥善保存。
                </td>
            </tr>
        </table>
        <table width="100%" class="tableBorder" border='1' cellspacing="0" style="border-collapse: collapse;"
            bgcolor="#ffffff" bordercolor="#cccccc">
            <tr align="center" valign="middle">
                <th height="22" colspan="88">
                    执行T-SQL（SQL）语句
                    （请谨慎！本操作具有危险性！）</th>
            </tr>
              
            
            <tr>
                <td>
                    <table cellspacing="0" cellpadding="0" border="0">
                        <tr>
                            <td colspan="2">
                                <asp:TextBox runat="server" TextMode="MultiLine" Columns="60" Rows="15" 
                                    ID="QueryTextbox" Width="642px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td  >
                                <asp:CheckBox runat="server" ID="WrapCheckBox" Checked="True" Text="将返回信息换行处理"></asp:CheckBox>
                            </td>
                            <td  align="right">
                                <asp:Button runat="server" Text="执行" CssClass="btn" ID="ExecuteButton" OnClick="ExecuteButton_Click">
                                </asp:Button>
                                <asp:Button runat="server" Text="导出这个SQL命令" CssClass="btn" ID="SaveButton" OnClick="SaveButton_Click">
                                </asp:Button>
                            </td>
                        </tr>
                    </table>
                    <br>
                    <b>从文件导入SQL命令</b>
                    <br>
                    <br>
                    <input id="FileUploadInput" type="file" runat="server" class="btn">
                    <asp:Button runat="server" Text="导入" CssClass="btn"  ID="LoadButton" OnClick="LoadButton_Click">
                    </asp:Button>
                    <br>
                    <br>
                    <asp:Panel runat="server" ID="ResultsPanel" EnableViewState="false">
                    </asp:Panel>
                    <asp:Label ID="ErrorLabel" runat="server" Visible="False" ForeColor="red"></asp:Label>
                </td>
            </tr>
         </table>
    </div>
    </form>
         <script type="text/javascript">

         var csseven = { 'background-color': 'f4f5eb' };
         var cssodd = { 'background-color': '' };
         var csshover = { 'background-color': 'CCFF99' };
         $('#tb  tr:even').css(csseven);
         $("#tb   tr:even").hover(
          function() { $(this).css(csshover); },
          function() { $(this).css(csseven); }
          );
         $("#tb   tr:odd").hover(
          function() { $(this).css(csshover); },
          function() { $(this).css(cssodd); }
          );
    </script>

</body>
</html>
